/**
 * 
 */
package com.fyp.ptma.dao.repository.irepository;

import java.util.List;

import javax.persistence.PersistenceException;

import org.hibernate.HibernateException;
import org.hibernate.exception.ConstraintViolationException;

import com.fyp.ptma.model.Application;
import com.fyp.ptma.model.ApplicationVersion;
import com.fyp.ptma.model.ApplicationVersionPk;
import com.fyp.ptma.model.Downloader;

/**
 * @author YahyaArshad
 * 
 */
public interface IApplicationDao extends IDao {

	public List<ApplicationVersion> getAllApplicationVersions(
			Application application) throws HibernateException;

	public boolean deleteApplicationVersion(ApplicationVersion appVersion)
			throws HibernateException;

	public Application getApplicationByUserAndNameSpace(String user,
			String nameSpace) throws HibernateException;

	public Long save(Application objToSave) throws PersistenceException,
			ConstraintViolationException;

	public Long save(ApplicationVersion objToSave) throws PersistenceException,
			ConstraintViolationException;

	public ApplicationVersion getApplicationVersionByPk(
			ApplicationVersionPk versionPk, String devEmail)
			throws HibernateException;

	public List<Downloader> getAllDevicesFor(Application application)
			throws HibernateException;

}
